package com.zutassociation.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zutassociation.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * @author 黄玉东
 * @version 1.0
 * @date 2021/4/18 18:28
 */
public class Message extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 消息ID
     */
    private Long messageId;

    /**
     * 消息发送人ID
     */
    private Long fromId;

    /**
     * 消息接受人ID
     */
    private Long toId;

    /**
     * 消息发送人名称
     */
    private String fromName;

    /**
     * 消息接收人名称
     */
    private String toName;

    /**
     * 消息标题
     */
    private String messageTitle;

    /**
     * 消息内容
     */
    private String messageContent;

    /**
     * 消息JSON数据
     */
    private String payload;

    /**
     * 消息阅读状态（0：未读，1：已读）
     */
    private String readStatus;

    /**
     * 消息状态（0正常 1关闭）
     */
    private String status;

    private String type;
    private String identity;

    public String getIdentity() {
        return identity;
    }

    public void setIdentity(String identity) {
        this.identity = identity;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Long getMessageId() {
        return messageId;
    }

    public void setMessageId(Long messageId) {
        this.messageId = messageId;
    }

    public Long getFromId() {
        return fromId;
    }

    public void setFromId(Long fromId) {
        this.fromId = fromId;
    }

    public Long getToId() {
        return toId;
    }

    public void setToId(Long toId) {
        this.toId = toId;
    }

    public String getFromName() {
        return fromName;
    }

    public void setFromName(String fromName) {
        this.fromName = fromName;
    }

    public String getToName() {
        return toName;
    }

    public void setToName(String toName) {
        this.toName = toName;
    }

    public String getMessageTitle() {
        return messageTitle;
    }

    public void setMessageTitle(String messageTitle) {
        this.messageTitle = messageTitle;
    }

    public String getMessageContent() {
        return messageContent;
    }

    public void setMessageContent(String messageContent) {
        this.messageContent = messageContent;
    }

    public String getPayload() {
        return payload;
    }

    public void setPayload(String payload) {
        this.payload = payload;
    }

    public String getReadStatus() {
        return readStatus;
    }

    public void setReadStatus(String readStatus) {
        this.readStatus = readStatus;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("messageId", getMessageId())
                .append("fromId", getFromId())
                .append("toId", getToId())
                .append("fromName", getFromName())
                .append("toName", getToName())
                .append("messageTitle", getMessageTitle())
                .append("messageContent", getMessageContent())
                .append("payload", getPayload())
                .append("readStatus", getReadStatus())
                .append("status", getStatus())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("type", getType())
                .append("identity", getIdentity())
                .toString();
    }
}
